<?php
$day = $_SESSION['quickregister']['step1']['bean_day'];
$month = $_SESSION['quickregister']['step1']['bean_month'];
$year = $_SESSION['quickregister']['step1']['bean_year'];
$gender = $_SESSION['quickregister']['step1']['bean_gender'];
?>
<h2>%main_step1%</h2>

        <div id="date-selector">
            <h3>%step1_msg1%</h3>
<?php if($tpl->l != "en") { ?>
<select name="bean.day" id="bean_day" class="dateselector"><option value="">%Day%</option><?php for($d =1; $d <= 31; $d++){ ?><option value="<?=$d?>"<?php if($day == $d) { echo ' selected="selected"'; } ?>><?=$d?></option><?php }?></select>
<select name="bean.month" id="bean_month" class="dateselector"><option value="">%Month%</option><?php for($m =1; $m <= 12; $m++){ ?><option value="<?=$m?>"<?php if($month == $m) { echo ' selected="selected"'; } ?>><?=getMonth($m)?></option><?php }?></select>
<?php } else { ?>
<select name="bean.month" id="bean_month" class="dateselector"><option value="">%Month%</option><?php for($m =1; $m <= 12; $m++){ ?><option value="<?=$m?>"<?php if($month == $m) { echo ' selected="selected"'; } ?>><?=getMonth($m)?></option><?php }?></select>
<select name="bean.day" id="bean_day" class="dateselector"><option value="">%Day%</option><?php for($d =1; $d <= 31; $d++){ ?><option value="<?=$d?>"<?php if($day == $d) { echo ' selected="selected"'; } ?>><?=$d?></option><?php }?></select>
<?php } ?>
<select name="bean.year" id="bean_year" class="dateselector"><option value="">%Year%</option><?php for($y =2004; $y >= 1900; $y--){ ?><option value="<?=$y?>"<?php if($year == $y) { echo ' selected="selected"'; } ?>><?=$y?></option><?php }?></select>         </div>

        <div class="delimiter_smooth">
            <div class="flat">&nbsp;</div>
            <div class="arrow">&nbsp;</div>
            <div class="flat">&nbsp;</div>
        </div>

        <div id="inner-container">
            <div id="gender-selection">
                <h3>%step1_msg2%</h3>
                <input type="hidden" id="avatarGender" name="bean.gender" value=""/>
                <ul id="gender-choices">
                    <li>
                        <span class="bgtop"></span>
                        <span class="bgbottom"></span>
                        <span class="gender-choice">
                            %step1_male%<br/><img alt="male" src="[web-gallery]/v2/images/registration/male_sign.png" width="36" height="47" />
                        </span>
                    </li>
                    <li>
                        <span class="bgtop"></span>
                        <span class="bgbottom"></span>
                        <span class="gender-choice">
                            %step1_female%<br/><img alt="female" src="[web-gallery]/v2/images/registration/female_sign.png" width="36" height="47" />
                        </span>
                    </li>
                </ul>
            </div>
        </div>
    </form>

    <div id="select">
        <a id="back-link" href="/">%main_back%</a>
        <div class="button">
            <a id="proceed" href="#" class="area">%main_next%</a>
            <span class="close"></span>
        </div>
   </div>
</div>

<script type="text/javascript">
    L10N.put("identity.register.overlay.loading.text", '%main_loading%');
    document.observe("dom:loaded", function() {
        QuickRegister.initAgeGate(true);
        QuickRegister.initGenderChooser("<?=($gender ? $gender : 'male')?>");
    });
</script>

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-448325-19']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>